﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Library_Code.BIZ;
namespace Library_Code.DAL
{
    public class SanPhamDAL
    {
        BabyToysDB db = new BabyToysDB();
        public string GetTenSP(int masp)
        {
            SANPHAM sp = db.SANPHAMs.SingleOrDefault(s => s.MaSP == masp);
            return sp.TenSP;
        }
        public int GetIdSanPham(int masp)
        {
            SANPHAM sp = db.SANPHAMs.SingleOrDefault(s => s.MaSP == masp);
            return sp.IdSanPham;
        }
    }
}
